import Request from '@/utils/request'

export function loadList(data) {
  return new Request({
    url: '/admin/channel/list',
    method: 'post',
    data
  })
}

export function saveData(data) {
  return new Request({
    url: '/admin/channel/save',
    method: 'post',
    data
  })
}

export function updateData(data) {
  return new Request({
    url: '/admin/channel/update',
    method: 'post',
    data
  })
}

export function delData(id) {
  return new Request({
    url: '/admin/channel/delete',
    method: 'post',
    data: { id } // Send id as part of the request body
  })
}

// export function delData (id) {
//   return new Request({
//     url: '/admin/channel/delete' + '/' + id,
//     method: 'get'
//   })
// }
